/*HiNotify 1.0.0 Development*/
/*Powered By Skyogo Studio*/
if(Hikic().version() === "1.2"){
HikicPlugin().join("HiNotify");
HikicPlugin().setParameter("HiNotify","1.0.0","2018-03-16");
var notClickCode;
_.prototype.notify = function(title,body,icon){
    Notification.requestPermission().then(function(result) {
        if(result==="granted"){
            if(icon===undefined||icon===""||icon===null){
                if(notClickCode === null||notClickCode === undefined||notClickCode===""){
                    var not = new Notification(title,{
                        body:body
                    });
                }else{
                    var not = new Notification(title,{
                        body:body
                    });
                    not.onclick = function() {
                        eval(notClickCode);
                    }
                }
            }else{
                if(notClickCode === null||notClickCode === undefined||notClickCode===""){
                    var not = new Notification(title,{
                        body:body,
                        icon:icon
                    });
                }else{
                    var not = new Notification(title,{
                        body:body,
                        icon:icon
                    });
                    not.onclick = function() {
                        eval(notClickCode);
                    }
                }
            }
        }
    });
}
_.prototype.notifyClick = function(code){
    notClickCode = code;
}
}else{
    alert("Hikic.js版本不为1.2，请下载1.2版本Hikic！");
}